import request from '@/utils/request'

// 获取所有资源分类列表
export const fetchListAllCate = () => {
    return request({
        url: '/resourceCategory/listAll',
        method: 'get'
    })
}

// 创建资源分类
export const createResourceCate = (data) => {
    return request({
        url: '/resourceCategory/create',
        method: 'post',
        data: data
    })
}

// 更新资源分类
export const updateResourceCate = (id, data) => {
    return request({
        url: '/resourceCategory/update/' + id,
        method: 'post',
        data: data
    })
}

// 删除资源分类const
export const deleteResourceCate = (id) => {
    return request({
        url: '/resourceCategory/delete/' + id,
        method: 'post'
    })
}
